<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <title>js中的点击事件（click）的实现方式</title>
</head>

<body>
    <button id="btn" onclick="threeFn()">点我</button>
    <script type="text/javascript">
        function threeFn() {
            alert("通过标签onclick属性");
        }
    </script>
</body>
    
</html>